template <typename alc, int s> struct alc_stack {
	alc st[s + 5];
	int t = 0;
	int size() {
		return t;
	}
	bool empty() {
		return !t;
	}
	void clear() {
		t = 0;
	}
	void push(alc x) {
		if (t >= s) {
			throw overflow_error("alc_stack overflow qwq");
		} else {
			st[++t] = x;
		}
	}
	alc top() {
		if (!t) {
			throw out_of_range("alc_stack is empty qwq");
		} else {
			return st[t];
		}
	}
	void pop() {
		if (!t) {
			throw out_of_range("alc_stack is empty qwq");
		} else {
			t--;
		}
	}
};